package com.example.demo.entity;

import javax.persistence.*;
import java.math.BigDecimal;
import java.sql.Timestamp;

/**
 * Created by qwesdfok on 2017/9/30.
 */
@Entity
@Table(name = "user", schema = "speedjump3", catalog = "")
public class UserEntity {
    private int id;
    private String nickname;
    private String qqOpenid;
    private String wxOpenid;
    private String wbOpenid;
    private String phone;
    private String headImgUrl;
    private String password;
    private Integer gender;
    private Integer defaultAddrId;
    private String birthday;
    private BigDecimal wallet;
    private Integer integral;
    private Timestamp createTime;
    private Timestamp lastLoginTime;
    private String smsCode;
    private Timestamp smsCodeDeadline;
    private Integer status;
    private String note;
    private String invitationCode;
    private Timestamp updateTime;
    private Integer isShow;
    private Integer isTimer;
    private Integer member;
    private Timestamp memberExpired;
    private String deviceToken;
    private Integer device;
    private String wxNickname;
    private String wxHeadImgUrl;
    private String email;
    private String proxyAddress;
    private String proxyName;

    @Id
    @Column(name = "id")
    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    @Basic
    @Column(name = "nickname")
    public String getNickname() {
        return nickname;
    }

    public void setNickname(String nickname) {
        this.nickname = nickname;
    }

    @Basic
    @Column(name = "qq_openid")
    public String getQqOpenid() {
        return qqOpenid;
    }

    public void setQqOpenid(String qqOpenid) {
        this.qqOpenid = qqOpenid;
    }

    @Basic
    @Column(name = "wx_openid")
    public String getWxOpenid() {
        return wxOpenid;
    }

    public void setWxOpenid(String wxOpenid) {
        this.wxOpenid = wxOpenid;
    }

    @Basic
    @Column(name = "wb_openid")
    public String getWbOpenid() {
        return wbOpenid;
    }

    public void setWbOpenid(String wbOpenid) {
        this.wbOpenid = wbOpenid;
    }

    @Basic
    @Column(name = "phone")
    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    @Basic
    @Column(name = "head_img_url")
    public String getHeadImgUrl() {
        return headImgUrl;
    }

    public void setHeadImgUrl(String headImgUrl) {
        this.headImgUrl = headImgUrl;
    }

    @Basic
    @Column(name = "password")
    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    @Basic
    @Column(name = "gender")
    public Integer getGender() {
        return gender;
    }

    public void setGender(Integer gender) {
        this.gender = gender;
    }

    @Basic
    @Column(name = "default_addr_id")
    public Integer getDefaultAddrId() {
        return defaultAddrId;
    }

    public void setDefaultAddrId(Integer defaultAddrId) {
        this.defaultAddrId = defaultAddrId;
    }

    @Basic
    @Column(name = "birthday")
    public String getBirthday() {
        return birthday;
    }

    public void setBirthday(String birthday) {
        this.birthday = birthday;
    }

    @Basic
    @Column(name = "wallet")
    public BigDecimal getWallet() {
        return wallet;
    }

    public void setWallet(BigDecimal wallet) {
        this.wallet = wallet;
    }

    @Basic
    @Column(name = "integral")
    public Integer getIntegral() {
        return integral;
    }

    public void setIntegral(Integer integral) {
        this.integral = integral;
    }

    @Basic
    @Column(name = "create_time")
    public Timestamp getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Timestamp createTime) {
        this.createTime = createTime;
    }

    @Basic
    @Column(name = "last_login_time")
    public Timestamp getLastLoginTime() {
        return lastLoginTime;
    }

    public void setLastLoginTime(Timestamp lastLoginTime) {
        this.lastLoginTime = lastLoginTime;
    }

    @Basic
    @Column(name = "sms_code")
    public String getSmsCode() {
        return smsCode;
    }

    public void setSmsCode(String smsCode) {
        this.smsCode = smsCode;
    }

    @Basic
    @Column(name = "sms_code_deadline")
    public Timestamp getSmsCodeDeadline() {
        return smsCodeDeadline;
    }

    public void setSmsCodeDeadline(Timestamp smsCodeDeadline) {
        this.smsCodeDeadline = smsCodeDeadline;
    }

    @Basic
    @Column(name = "status")
    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    @Basic
    @Column(name = "note")
    public String getNote() {
        return note;
    }

    public void setNote(String note) {
        this.note = note;
    }

    @Basic
    @Column(name = "invitation_code")
    public String getInvitationCode() {
        return invitationCode;
    }

    public void setInvitationCode(String invitationCode) {
        this.invitationCode = invitationCode;
    }

    @Basic
    @Column(name = "update_time")
    public Timestamp getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Timestamp updateTime) {
        this.updateTime = updateTime;
    }

    @Basic
    @Column(name = "isShow")
    public Integer getIsShow() {
        return isShow;
    }

    public void setIsShow(Integer isShow) {
        this.isShow = isShow;
    }

    @Basic
    @Column(name = "isTimer")
    public Integer getIsTimer() {
        return isTimer;
    }

    public void setIsTimer(Integer isTimer) {
        this.isTimer = isTimer;
    }

    @Basic
    @Column(name = "member")
    public Integer getMember() {
        return member;
    }

    public void setMember(Integer member) {
        this.member = member;
    }

    @Basic
    @Column(name = "member_expired")
    public Timestamp getMemberExpired() {
        return memberExpired;
    }

    public void setMemberExpired(Timestamp memberExpired) {
        this.memberExpired = memberExpired;
    }

    @Basic
    @Column(name = "device_token")
    public String getDeviceToken() {
        return deviceToken;
    }

    public void setDeviceToken(String deviceToken) {
        this.deviceToken = deviceToken;
    }

    @Basic
    @Column(name = "device")
    public Integer getDevice() {
        return device;
    }

    public void setDevice(Integer device) {
        this.device = device;
    }

    @Basic
    @Column(name = "wx_nickname")
    public String getWxNickname() {
        return wxNickname;
    }

    public void setWxNickname(String wxNickname) {
        this.wxNickname = wxNickname;
    }

    @Basic
    @Column(name = "wx_head_img_url")
    public String getWxHeadImgUrl() {
        return wxHeadImgUrl;
    }

    public void setWxHeadImgUrl(String wxHeadImgUrl) {
        this.wxHeadImgUrl = wxHeadImgUrl;
    }

    @Basic
    @Column(name = "email")
    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    @Basic
    @Column(name = "proxy_address")
    public String getProxyAddress() {
        return proxyAddress;
    }

    public void setProxyAddress(String proxyAddress) {
        this.proxyAddress = proxyAddress;
    }

    @Basic
    @Column(name = "proxy_name")
    public String getProxyName() {
        return proxyName;
    }

    public void setProxyName(String proxyName) {
        this.proxyName = proxyName;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        UserEntity that = (UserEntity) o;

        if (id != that.id) return false;
        if (nickname != null ? !nickname.equals(that.nickname) : that.nickname != null) return false;
        if (qqOpenid != null ? !qqOpenid.equals(that.qqOpenid) : that.qqOpenid != null) return false;
        if (wxOpenid != null ? !wxOpenid.equals(that.wxOpenid) : that.wxOpenid != null) return false;
        if (wbOpenid != null ? !wbOpenid.equals(that.wbOpenid) : that.wbOpenid != null) return false;
        if (phone != null ? !phone.equals(that.phone) : that.phone != null) return false;
        if (headImgUrl != null ? !headImgUrl.equals(that.headImgUrl) : that.headImgUrl != null) return false;
        if (password != null ? !password.equals(that.password) : that.password != null) return false;
        if (gender != null ? !gender.equals(that.gender) : that.gender != null) return false;
        if (defaultAddrId != null ? !defaultAddrId.equals(that.defaultAddrId) : that.defaultAddrId != null)
            return false;
        if (birthday != null ? !birthday.equals(that.birthday) : that.birthday != null) return false;
        if (wallet != null ? !wallet.equals(that.wallet) : that.wallet != null) return false;
        if (integral != null ? !integral.equals(that.integral) : that.integral != null) return false;
        if (createTime != null ? !createTime.equals(that.createTime) : that.createTime != null) return false;
        if (lastLoginTime != null ? !lastLoginTime.equals(that.lastLoginTime) : that.lastLoginTime != null)
            return false;
        if (smsCode != null ? !smsCode.equals(that.smsCode) : that.smsCode != null) return false;
        if (smsCodeDeadline != null ? !smsCodeDeadline.equals(that.smsCodeDeadline) : that.smsCodeDeadline != null)
            return false;
        if (status != null ? !status.equals(that.status) : that.status != null) return false;
        if (note != null ? !note.equals(that.note) : that.note != null) return false;
        if (invitationCode != null ? !invitationCode.equals(that.invitationCode) : that.invitationCode != null)
            return false;
        if (updateTime != null ? !updateTime.equals(that.updateTime) : that.updateTime != null) return false;
        if (isShow != null ? !isShow.equals(that.isShow) : that.isShow != null) return false;
        if (isTimer != null ? !isTimer.equals(that.isTimer) : that.isTimer != null) return false;
        if (member != null ? !member.equals(that.member) : that.member != null) return false;
        if (memberExpired != null ? !memberExpired.equals(that.memberExpired) : that.memberExpired != null)
            return false;
        if (deviceToken != null ? !deviceToken.equals(that.deviceToken) : that.deviceToken != null) return false;
        if (device != null ? !device.equals(that.device) : that.device != null) return false;
        if (wxNickname != null ? !wxNickname.equals(that.wxNickname) : that.wxNickname != null) return false;
        if (wxHeadImgUrl != null ? !wxHeadImgUrl.equals(that.wxHeadImgUrl) : that.wxHeadImgUrl != null) return false;
        if (email != null ? !email.equals(that.email) : that.email != null) return false;
        if (proxyAddress != null ? !proxyAddress.equals(that.proxyAddress) : that.proxyAddress != null) return false;
        if (proxyName != null ? !proxyName.equals(that.proxyName) : that.proxyName != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = id;
        result = 31 * result + (nickname != null ? nickname.hashCode() : 0);
        result = 31 * result + (qqOpenid != null ? qqOpenid.hashCode() : 0);
        result = 31 * result + (wxOpenid != null ? wxOpenid.hashCode() : 0);
        result = 31 * result + (wbOpenid != null ? wbOpenid.hashCode() : 0);
        result = 31 * result + (phone != null ? phone.hashCode() : 0);
        result = 31 * result + (headImgUrl != null ? headImgUrl.hashCode() : 0);
        result = 31 * result + (password != null ? password.hashCode() : 0);
        result = 31 * result + (gender != null ? gender.hashCode() : 0);
        result = 31 * result + (defaultAddrId != null ? defaultAddrId.hashCode() : 0);
        result = 31 * result + (birthday != null ? birthday.hashCode() : 0);
        result = 31 * result + (wallet != null ? wallet.hashCode() : 0);
        result = 31 * result + (integral != null ? integral.hashCode() : 0);
        result = 31 * result + (createTime != null ? createTime.hashCode() : 0);
        result = 31 * result + (lastLoginTime != null ? lastLoginTime.hashCode() : 0);
        result = 31 * result + (smsCode != null ? smsCode.hashCode() : 0);
        result = 31 * result + (smsCodeDeadline != null ? smsCodeDeadline.hashCode() : 0);
        result = 31 * result + (status != null ? status.hashCode() : 0);
        result = 31 * result + (note != null ? note.hashCode() : 0);
        result = 31 * result + (invitationCode != null ? invitationCode.hashCode() : 0);
        result = 31 * result + (updateTime != null ? updateTime.hashCode() : 0);
        result = 31 * result + (isShow != null ? isShow.hashCode() : 0);
        result = 31 * result + (isTimer != null ? isTimer.hashCode() : 0);
        result = 31 * result + (member != null ? member.hashCode() : 0);
        result = 31 * result + (memberExpired != null ? memberExpired.hashCode() : 0);
        result = 31 * result + (deviceToken != null ? deviceToken.hashCode() : 0);
        result = 31 * result + (device != null ? device.hashCode() : 0);
        result = 31 * result + (wxNickname != null ? wxNickname.hashCode() : 0);
        result = 31 * result + (wxHeadImgUrl != null ? wxHeadImgUrl.hashCode() : 0);
        result = 31 * result + (email != null ? email.hashCode() : 0);
        result = 31 * result + (proxyAddress != null ? proxyAddress.hashCode() : 0);
        result = 31 * result + (proxyName != null ? proxyName.hashCode() : 0);
        return result;
    }
}
